#ifndef AUROKEYBREAKERFORM_H
#define AUROKEYBREAKERFORM_H

#include <QWidget>
#include <QHash>

namespace Ui {
class AutoKeyBreakerForm;
}

class AutoKeyBreakerForm : public QWidget
{
    Q_OBJECT
    
public:
    explicit AutoKeyBreakerForm(QWidget *parent = 0);
    ~AutoKeyBreakerForm();

public slots:
    void haveKeyLenght(int keyLenght);
    void broken(QByteArray key, QByteArray plain);
    void failed();
    
private slots:
    void on_load_clicked();

    void on_loadFreq_clicked();

    void on_save_clicked();

    void on_decrypt_clicked();

    void on_break_2_clicked();

    void on_cEscape_clicked();

    void on_URLEscape_clicked();

    void on_hex_clicked();

    void on_base64_clicked();

    void on_binaryMode_clicked(bool checked);

    void on_findLength_clicked();

private:
    Ui::AutoKeyBreakerForm *ui;

    QByteArray alphabet;
    QList<QHash<QByteArray, qreal> > langFrequencies;
    QList<qreal> baseFrequencies;
    bool hasLoadedFreqs;
    int keyFragmentSize;
};

#endif // AUROKEYBREAKERFORM_H
